package main

import (
	"fmt"

	"gopkg.in/confluentinc/confluent-kafka-go.v1/kafka"
)

func main() {
	a, _ := kafka.NewAdminClient(&kafka.ConfigMap{"bootstrap.servers": "127.0.0.1:9092"})
	res, _ := a.GetMetadata(nil, true, 1000)
	for _, item := range res.Topics {
		fmt.Println("item.Topic", item.Topic)
		fmt.Println("item.Partitions", item.Partitions)
	}
}
